package com.antler.smt.admin.controller;

import com.antler.smt.admin.utils.ShiroUtils;
import com.antler.smt.entity.UserEntity;

/**
 * 权限Controller基类
 *
 * @author vic
 * @date 2018-04-02 11:55
 */
public abstract class BaseController {
    /**
     * 获取用户信息
     *
     * @return 用户
     */
    protected UserEntity getUser() {
        return ShiroUtils.getUserEntity();
    }

    /**
     * 获取用户id
     *
     * @return 用户id
     */
    protected Long getUserId() {
        return getUser().getId();
    }
}
